(function() {

    var $u = juliet.using({ validator : 'juliet.validation.validator' });

    var CheckBoxClass = function() {

        this.validate = function() {
            var
            value = this.chain.fieldValueHelper.fieldValue,
            wrongValue = this.getOptionValue('wrongValue');

            if (value === wrongValue) this.result = vr.FAILED;
            else this.result = vr.SUCCESS;
        };

        this.getError = function() {
            return this.base.getError.call(this, 'checkBox');
        };

    };

    $u('validator').addValidator('CheckBox', CheckBoxClass);

})();
